


<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>专业化评价预警工具 - 登录/注册/忘记密码/删除用户</title>
    <link href="${ROOT}/mind/css/element-ui.css" rel="stylesheet">
        <style>
            .el-dropdown-link {
                cursor: pointer;
                color: #409EFF;
            }
            .el-icon-arrow-down {
                font-size: 12px;
            }
            .demonstration {
                display: block;
                color: #8492a6;
                font-size: 14px;
                margin-bottom: 20px;
            }
        </style>
</head>
<body>
<div class="header">
    <nav class="navbar top-navbar navbar-expand-md navbar-light" id="navbar-header">
        <!-- Logo -->
        <div class="navbar-header">
            <a class="navbar-brand" href="${ROOT}">
                <!-- Logo icon -->
                <b><img src="${ROOT}/mind/images/logo.png" alt="homepage" class="dark-logo" /></b>
                <!--End Logo icon -->
                <!-- Logo text -->
                <!--
                <span><img src="${ROOT}/mind/images/logo-text.png" alt="homepage" class="dark-logo" /></span>
                -->
                <span>专业化评价预警工具</span>
            </a>
        </div>
        <!-- End Logo -->

        <div class="navbar-collapse">
            <!-- toggle and nav items -->
            <ul class="navbar-nav mr-auto mt-md-0">
                <li class="nav-item"> <a class="nav-link toggle-nav hidden-md-up text-muted  " href="javascript:void(0)"><i class="mdi mdi-menu"></i></a> </li>
                <li class="nav-item m-l-10"> <a class="nav-link sidebartoggle hidden-sm-down text-muted  " href="javascript:void(0)"><i class="ti-menu"></i></a> </li>
                <li class="nav-item dropdown mega-menu">&nbsp;</li>
            </ul>

            <!-- User profile and search -->
            <ul class="navbar-nav my-lg-0">
                <el-row style="display:flex;align-items:center" class="block-col-2">
                    <el-col :span="12">
                        <el-dropdown trigger="click" @command="handleCommand">
                            <div id="id_name" class="el-dropdown-link" style="margin-bottom: 0;display: flex;align-items: center;margin-right: 20px"><i class="el-icon-arrow-down el-icon--right"></i></div>
                            <el-dropdown-menu slot="dropdown">
                                <el-dropdown-item command="exit">退出登录</el-dropdown-item>
                                <el-dropdown-item command="register" id="zhuce" style="display: none">注册用户</el-dropdown-item>
                                <el-dropdown-item command="modification">修改密码</el-dropdown-item>
                                <el-dropdown-item command="del" id="shan" style="display: none">删除用户</el-dropdown-item>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </el-col>
                </el-row>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle text-muted" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-upload"></i>&nbsp;上传</a>
                    <div class="dropdown-menu dropdown-menu-right animated slideInRight">
                        <ul class="dropdown-user">
                            <li><a href="#" data-href="${ROOT}/o/upload" class="caution-upload"> 劳动组织预警分析数据</a></li>
                            <li><a href="#" data-href="${ROOT}/w/upload" class="caution-upload"> 员工预警分析数据</a></li>
                            <li><a href="#" data-href="${ROOT}/t/upload" class="caution-upload"> 人才开发预警分析数据</a></li>
                            <li><a href="#" data-href="${ROOT}/l/upload" class="caution-upload"> 干部预警分析数据</a></li>
                        </ul>
                    </div>
                </li>
            </ul>
        </div>
    </nav>
</div>

<script src="${ROOT}/mind/js/vue2.js"></script>
<!--<link href="${ROOT}/mind/css/element-ui.css" rel="stylesheet">-->
<!-- 引入Element Plus的JavaScript -->
<script src="${ROOT}/mind/js/element-ui.js"></script>
<script type="text/javascript">
    new Vue({
        el: '#navbar-header',
        data(){
            return{
                Name:''
            }
        },
        created() {
            this.getUserName();
        },
        methods:{
            getUserName(){
                this.Name = sessionStorage.getItem('userName')
                document.getElementById('id_name').innerHTML = this.Name
                let jj = sessionStorage.getItem('userPermissions')

                if(jj == 9) {
                    document.getElementById('zhuce').style.display = 'block'
                    document.getElementById('shan').style.display = 'block'
                }
                // if (jj.includes('1') && jj.includes('2') && jj.includes('3') && jj.includes('4')) {
                //     document.getElementById('zhuce').style.display = 'block'
                //     document.getElementById('shan').style.display = 'block'
                // }
            },
            handleCommand(command) {
                switch (command){
                    case 'exit':
                        document.getElementById('loginDiv').style.display = 'block'
                        document.getElementById('login_div').style.display = 'block'
                        document.getElementById('register_div').style.display = 'none';
                        document.getElementById('modification_div').style.display = 'none'
                        document.getElementById('del_div2').style.display = 'none'
                        sessionStorage.clear()
                        break;
                    case 'register':
                        document.getElementById('register_div').style.display = 'block';
                        document.getElementById('loginDiv').style.display = 'block'
                        document.getElementById('modification_div').style.display = 'none'
                        document.getElementById('del_div2').style.display = 'none'
                        break;
                    case 'modification':
                        document.getElementById('modification_div').style.display = 'block'
                        document.getElementById('loginDiv').style.display = 'block'
                        document.getElementById('del_div2').style.display = 'none'
                        document.getElementById('register_div').style.display = 'none';
                        break;
                    case 'del':
                        document.getElementById('loginDiv').style.display = 'block'
                        document.getElementById('del_div2').style.display = 'block'
                        document.getElementById('modification_div').style.display = 'none'
                        document.getElementById('register_div').style.display = 'none';
                        break;
                }
            }
        }
    })
</script>
</body>
</html>